<template>
  <div>
    <h1 class="header">Header</h1>
    <p>{{ name }},{{ age }},{{ sex }}</p>
    <p>{{price|pricefil(2)}}</p>
    <p>{{str|formatDate('chi')}}</p>
    
    <Update/>

  </div>
</template>

<script>
export default {
  name: "MyHeader",
  props: ["name", "age", "sex"],
  data(){
    return {
      price:300,
      str:'zhangsan'
    }
  },
  filters:{
    pricefil(price,num){
      return '¥'+price.toFixed(num)
    }
  }
};
</script>

<style scoped>
.header {
  background: red;
  height: 100px;
}
</style>